package com.hdax.dm.utils.msg;

import com.rabbitmq.client.Channel;
import org.springframework.amqp.core.MessageProperties;
import org.springframework.amqp.rabbit.annotation.RabbitListener;
import org.springframework.stereotype.Component;

import java.io.IOException;
import java.util.Map;

@Component
@RabbitListener(queues = {"dm"})
public class Msg {

    public void msg(Map<String,String> map, Channel channel, MessageProperties properties) throws IOException {

        Long id = properties.getDeliveryTag();
        channel.basicAck(id,false);
        System.out.println("队列已移除");
    }
}
